﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Server;

namespace Server_Test
{
    public partial class Form1 : Form
    {
        private ServerAPI serverAPI;

        public Form1()
        {
            InitializeComponent();
            Dictionary<string, string> options = new Dictionary<string, string>();
            //options.Add("addressofserver", "zedd-pc");
            options.Add("Projects_Path", btn_Projects.Text);
            
            serverAPI = new ServerAPI(options);
            btn_Stop.Enabled = false;
        }

        private void btn_start_Click(object sender, EventArgs e)
        {
            btn_start.Enabled = false;
            btn_Stop.Enabled = true;
            
            serverAPI.start();
            
        }

        private void btn_Stop_Click(object sender, EventArgs e)
        {
            
            serverAPI.stop();
            btn_start.Enabled = true;
            btn_Stop.Enabled = false;
        }
    }
}
